<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    
        .div1{
            width: 200px;
            height: 200px;
            border: 1px solid black;
        }

        .div1 h3{
            /*左浮动*/
            float: left;
            /*覆盖默认自带的值*/
            margin: 0;
        }

        .div1 span{
            /*右浮动*/
            float: right;
        }
        
    
    </style>
</head>

<body>


    <div class="div1">

        <h3>哈哈哈</h3>
        <span>呵呵呵</span>
    </div>


</body>

</html>